import request from '@/utils/request'

// 查询标准层校验语句信息列表
export function listCheck(query) {
  return request({
    url: '/reportworld/databaseCheck/list',
    method: 'get',
    params: query
  })
}

// 查询标准层校验语句信息详细
export function getCheck(data) {
  return request({
    url: '/reportworld/databaseCheck/getCheck',
    method: 'post',
    data: data
  })
}

// 新增标准层校验语句信息
export function addCheck(data) {
  return request({
    url: '/reportworld/databaseCheck',
    method: 'post',
    data: data
  })
}

// 修改标准层校验语句信息
export function updateCheck(data) {
  return request({
    url: '/reportworld/databaseCheck',
    method: 'put',
    data: data
  })
}

// 删除标准层校验语句信息
export function delCheck(idList, hisVersion) {
  const data = {
    idList,
    hisVersion
  };
  return request({
    url: '/reportworld/databaseCheck/remove',
    method: 'post',
    data: data
  })
}

/**
 * 保存顺序
 * @param data
 */
export function handleUpdateOrderNum(data) {
  return request({
    url: '/reportworld/databaseCheck/handleUpdateOrderNum',
    method: 'post',
    data: data
  })
}

// 初始化查询
export function init(data) {
  return request({
    url: '/reportworld/databaseCheck/init',
    method: 'post',
    data: data
  })
}


/**
 * 更新校验语句
 */
export function databaseDataCheckSql(data) {
  return request({
    url: '/reportworld/databaseCheck/databaseDataCheckSql',
    method: 'post',
    data: data
  })
}

/**
 * 数据校验
 */
export function databaseDataCheck(data) {
  return request({
    url: '/reportworld/databaseCheck/databaseDataCheck/',
    method: 'post',
    data: data
  })
}


